<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>计时器</title>
	</head>
	<body>
		<div id="app">
			<Timer ref="startTimer"></Timer>
			<button @click="start">开始计时</button>
			<button @click="stop">停止计时</button>
		</div>
		<script src="https://lib.baomitu.com/vue/2.6.14/vue.min.js"></script>
		<script src="https://unpkg.com/http-vue-loader"></script>
		<script type="text/javascript">
			new Vue({
				el: "#app",
				data: {
					time: 1
				},
				methods:{
					start(){
						this.$refs.startTimer.start();
					},
					stop(){
						this.$refs.startTimer.stop();
					}
				},
				components: {
					'Timer': httpVueLoader('/vue/time.vue')
				},
			})
		</script>
	</body>
</html>
